<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:m="http://www.ol4jsf.org"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:o="http://openfaces.org/">


	
	<rich:simpleTogglePanel switchType="client" label="ZONAS ESPACIALES / PARCELAS">
		<table style="width: 100%;" cellpadding="10">
			<tr valign="top">
				<th style="width: 50%;">
					<div align="center">
						ANTES
					</div>
					<rich:separator lineType="solid"/>
				</th>
				<th style="width: 50%;">
					<div align="center">
						DESPUES
					</div>
					<rich:separator lineType="solid"/>
				</th>
			</tr>
			<tr valign="top">
				<td>
					<div align="center">
						<m:map width="350px" height="350px" options="#{transactionQueryHelper.mapOptions(0)}" jsVariable="mapBeforeTrx">
							<m:wmsLayer
								name="Centroides de predio"
								url="#{generalHelper.wmsUrl}"
								params="{layers: '#{generalHelper.primaryWMSLayer}', transparent: true, format: 'image/png'}"
								options="{ isBaseLayer: true, projection: '#{generalHelper.workingSRS}' }">
							</m:wmsLayer>
							<m:vectorLayer name="Editable" jsVariable="vlayer"/>
							<m:vectorLayer name="parcelFeaturesLayer" jsVariable="parcelFeaturesLayer" />
							<m:navigationControl />
							<m:panZoomBarControl />
							<m:layerSwitcherControl options="{ascending:false, useLegendGraphics:true}"/>
							<m:scaleLineControl />
							<m:mousePositionControl />
							<m:script>#{transactionQueryHelper.mapScript(0, 'mapBeforeTrx')}</m:script>
						</m:map>
					</div>
				</td>
				<td>
					<div align="center">
						<m:map width="350px" height="350px"
						rendered="#{transactionQueryHelper.mapOptions(1) != null}"
						options="#{transactionQueryHelper.mapOptions(1)}"
						jsVariable="mapAfterTrx">
							<m:wmsLayer
								name="Centroides de predio"
								url="#{generalHelper.wmsUrl}"
								params="{layers: '#{generalHelper.primaryWMSLayer}', transparent: true, format: 'image/png'}"
								options="{ isBaseLayer: true, projection: '#{generalHelper.workingSRS}' }">
							</m:wmsLayer>
							<m:vectorLayer name="Editable" jsVariable="vlayer"/>
							<m:vectorLayer name="parcelFeaturesLayer" jsVariable="parcelFeaturesLayer" />
							<m:navigationControl />
							<m:panZoomBarControl />
							<m:layerSwitcherControl options="{ascending:false, useLegendGraphics:true}"/>
							<m:scaleLineControl />
							<m:mousePositionControl />
							<m:script>#{transactionQueryHelper.mapScript(1, 'mapAfterTrx')}</m:script>
						</m:map>
						
						<h:outputText rendered="#{transactionQueryHelper.mapOptions(1) == null}" value="--" />
					</div>
				</td>
			</tr>
		</table>
	</rich:simpleTogglePanel>
	<br />
	
	<rich:simpleTogglePanel switchType="client" label="DERECHOS, RESTRICCIONES Y RESPONSABILIDADES">
		<table style="width: 100%;" cellpadding="10">
			<tr valign="top">
				<th style="width: 50%;">
					<div align="center">
						ANTES
					</div>
					<rich:separator lineType="solid"/>
				</th>
				<th style="width: 50%;">
					<div align="center">
						DESPUES
					</div>
					<rich:separator lineType="solid"/>
				</th>
			</tr>
			<tr valign="top">
				<td>
					<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesRRR.xhtml">
						<ui:param name="spatialZoneList" value="#{transactionQueryHelper.requestedSpatialZones}" />
					</ui:include>
				</td>
				<td>
					<h:panelGroup rendered="#{transactionQueryHelper.selected.completed}">
						<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesRRR.xhtml">
							<ui:param name="spatialZoneList" value="#{transactionQueryHelper.originatedSpatialZones}" />
						</ui:include>
					</h:panelGroup>
					<h:panelGroup rendered="#{not transactionQueryHelper.selected.completed}">
						<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesRRR.xhtml">
							<ui:param name="spatialZoneList" value="#{transactionQueryHelper.inCourseSpatialZones}" />
						</ui:include>
					</h:panelGroup>
				</td>
			</tr>
		</table>
	</rich:simpleTogglePanel>
	<br />
	
	<rich:simpleTogglePanel switchType="client" label="DATOS DE LOS INMUEBLES">
		<table style="width: 100%;" cellpadding="10">
			<tr valign="top">
				<th style="width: 50%;">
					<div align="center">
						ANTES
					</div>
					<rich:separator lineType="solid"/>
				</th>
				<th style="width: 50%;">
					<div align="center">
						DESPUES
					</div>
					<rich:separator lineType="solid"/>
				</th>
			</tr>
			<tr valign="top">
				<td>
					<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesDataModifications.xhtml">
						<ui:param name="spatialZoneList" value="#{transactionQueryHelper.requestedSpatialZones}" />
					</ui:include>
				</td>
				<td>
					<h:panelGroup rendered="#{transactionQueryHelper.selected.completed}">
						<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesDataModifications.xhtml">
							<ui:param name="spatialZoneList" value="#{transactionQueryHelper.originatedSpatialZones}" />
						</ui:include>
					</h:panelGroup>
					<h:panelGroup rendered="#{not transactionQueryHelper.selected.completed}">
						<ui:include src="/WEB-INF/includes/spatialZone/allSpatialZonesDataModifications.xhtml">
							<ui:param name="spatialZoneList" value="#{transactionQueryHelper.inCourseSpatialZones}" />
						</ui:include>
					</h:panelGroup>
				</td>
			</tr>
		</table>
	</rich:simpleTogglePanel>

</ui:composition>
